<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>shiro</title>
    <style>
        #header{
            height: 75px;
        }
    </style>
</head>
<body>
<div id="header">
    <img th:src="@{../apache-shiro-logo.png}" style="height: 100%">
</div>
<h1>首页</h1>
<p th:text="${msg}" style="color: red"></p>
<hr>
<div th:if="${session.loginUser==null}">
    <a th:href="@{/user/toLogin}">登录</a>
</div>
<div shiro:hasPermission="add">
    <a th:href="@{/user/add}" style="text-decoration: none">添加用户</a>
    <span>|</span>
</div>
<div shiro:hasPermission="update">
    <a th:href="@{/user/edit}" style="text-decoration: none">修改用户</a>
</div>
</body>
</html>